package com.xing.libao.thread;

/**
 * Created with IntelliJ IDEA.
 * User: xingzhe
 * Date: 2015/9/14
 * Time: 14:38
 */
public class MyThread extends Thread {
    public MyThread(){

    }
    private String name;
    public MyThread(String name){
        this.name = name;
    }
    public void run(){
        for(int i=0;i<5;i++){
            System.out.println("name: " + name + " i: " + i);
        }
    }

    public static void main(String[] args) {
        MyThread myThread = new MyThread("A");
        MyThread myThread1 = new MyThread("B");
        myThread.start();
        myThread1.start();
    }
}
